package com.firefighting.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.firefighting.dao.TaskMapper;
import com.firefighting.entity.Task;

@Service
public class TaskService
{
	@Autowired
	private TaskMapper taskMapper;
	/*Hanjd 删除任务*/
	public int deleteTask(int id)
	{
		return taskMapper.deleteByPrimaryKey(id);
	}
	
	/*Hanjd 查询任务信息*/
	public Task queryTask(int id)
	{
		return taskMapper.selectByPrimaryKey(id);
	}
	
	/*Hanjd 根据buildingId查询任务信息*/
	public List<Task> queryTaskBuildingId(int buildingId)
	{
		return taskMapper.selectByBuildingId(buildingId);
	}
	/*Hanjd 根据buildingId查询任务信息*/
	public int insertSelective(Task task)
	{
		return taskMapper.insertSelective(task);
	}

   
}